//Luokasta cPot perityn gaussisen kuopan toteutus
//
//Joonas Koskinen
//Pro Gradu Työ
//Jyväskylän Yliopisto

#include "cGaussattr.h"

Gaussattr::Gaussattr() {
	setName("Gaussian attractive well");
	setUniverse(40.0);
	setWidth(getUniverse());
	setPotLeft(-1.0*getWidth()/2.0);
	setPotRight(getWidth()/2.0);
        setUniLeft(-1.0*getUniverse()/2.0);
        setUniRight(getUniverse()/2.0);
	setFx(getUniverse()/2.0);
	setTx(-1*getUniverse()/2.0);
	setDepth(0.0);
	setMinEnergy(-0.98);
	//cout << name << " syntyy " << endl;
	//filter[activefilter]->calculate(this);
}

double Gaussattr::getPotentialValueAt(double x) {
	//return -exp(-0.04*x*x);	
    return -1.0*exp(-1.0*x*x);	
    /*return -5.0*exp(-0.025*x*x) + 3.0*(exp(-5.0*x*x)+
           exp(-5.0*(x-8)*(x-8))+exp(-5.0*(x-7)*(x-7))+
           exp(-5.0*(x-6)*(x-6))+exp(-5.0*(x-5)*(x-5))+
           exp(-5.0*(x-4)*(x-4))+exp(-5.0*(x-3)*(x-3))+
           exp(-5.0*(x-2)*(x-2))+exp(-5.0*(x-1)*(x-1))+
           exp(-5.0*(x+1)*(x+1))+exp(-5.0*(x+2)*(x+2))+
           exp(-5.0*(x+3)*(x+3))+exp(-5.0*(x+4)*(x+4))+
           exp(-5.0*(x+5)*(x+5))+exp(-5.0*(x+6)*(x+6))+
           exp(-5.0*(x+7)*(x+7))+exp(-5.0*(x+8)*(x+8)));*/
}

Gaussattr::~Gaussattr(){}

